<?php echo $this->translate('ot-oauth-index:header'); ?>
<br /><br />
<a href="<?php echo $this->url(array('action' => 'add'), 'oauth', true); ?>" class="ui-state-default ui-corner-all linkButton">
	<?php echo $this->translate('ot-oauth-index:addButton'); ?>
<span class="ui-icon ui-icon-plusthick"></span></a>	
<br /><br />
<?php if (count($this->ownedConsumers) != 0): ?>
    <?php echo $this->translate('ot-oauth-index:applicationListText'); ?>
    <br />
	<?php foreach ($this->ownedConsumers as $c): ?>
	<div class="consumer">
		<div class="options">
			<a href="<?php echo $this->url(array('action' => 'details', 'consumerId' => $c['consumerId']), 'oauth', true); ?>" class="ui-state-default ui-corner-all linkButton">
			    <?php echo $this->translate('ot-oauth-index:detailsButton'); ?>
			<span class="ui-icon ui-icon-triangle-1-e"></span></a>			
		</div>		
		<div class="consumerIcon">
			<?php if ($c['imageId'] != 0): ?>
			<img src="<?php echo $this->url(array('imageId' => $c['imageId']), 'image', true); ?>" />
			<?php else: ?>
			<img src="<?php echo $this->baseUrl(); ?>/public/images/ot/consumer.png" alt="consumer" />
			<?php endif; ?>
		</div>	
		<div class="details">	
			<div class="name"><?php echo $c['name']; ?></div>
			<?php if ($c['website'] != ''): ?>
			<div class="website"><a target="_blank" class="linkButton" href="<?php echo $c['website']; ?>"><?php echo $c['website']; ?><span class="ui-icon ui-icon-extlink"></span></a></div>
			<?php endif; ?>
			<div class="description"><?php echo nl2br($c['description']); ?></div>
		</div>
	</div>
	<?php endforeach; ?>
<?php else: ?>
<?php echo $this->translate('ot-oauth-index:noApplications'); ?>
<?php endif; ?>